﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="utf-8" %>

<form id="form1">
    <div class='myzh_right_content fr'>
        <p class='right_head_title'><span class="span1">我的 ></span> 操作</p>
        <div class="recharge-content">
            <input type="hidden" id="user_id" name="user_id" value="${data.user_id}"/>
            <div class="mt-10">
                <span class="fl mt-3 w-120">用户编号：</span>
                ${data.user_id}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">注册email：</span>
                ${data.email}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">昵称：</span>
                ${data.nick_name}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">姓名：</span>
                ${data.true_name}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">头图：</span>
                <a href="${data.head_figure}" target="_blank">
                    <img src="${imgurl}${data.head_figure}" width="200" height="200">
                </a>
                <div class="cl"></div>
            </div>
            <%--<div class="mt-10">--%>
            <%--<span class="fl mt-3 w-120">状态：</span>--%>
            <%--<input type="text" class="txt txt-1 fl w-220" id="status" name="status" value="${data.status}">--%>
            <%--<div class="cl"></div>--%>
            <%--</div>--%>
            <div class="mt-10">
                <span class="fl mt-3 w-120">注册来源：</span>
                ${data.request_from}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">积分：</span>
                ${data.integral}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">邀请码：</span>
                ${data.invite_code}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">创建时间：</span>
                <fmt:formatDate value="${data.create_time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">修改时间：</span>
                <fmt:formatDate value="${data.modify_time}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                <div class="cl"></div>
            </div>

            <div class="mt-10">
                <span class="fl mt-3 w-120">护照号码：</span>
                ${data.passport_code}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">护照正面：</span>
                <a target="_blank" href="${imgurl}${data.img_passport_front}">
                    <img src="${imgurl}${data.img_passport_front}" width="200" height="200">
                </a>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">护照反面：</span>
                <a target="_blank" href="${imgurl}${data.img_passport_after}">
                    <img src="${imgurl}${data.img_passport_after}" width="200" height="200">
                </a>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">手持护照：</span>
                <a target="_blank" href="${imgurl}${data.img_passport_hold}">
                    <img src="${imgurl}${data.img_passport_hold}" width="200" height="200">
                </a>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">常住地址：</span>
                ${data.address}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">常住地址截图说明：</span>
                <a target="_blank" href="${imgurl}${data.img_address}">
                    <img src="${imgurl}${data.img_address}" width="200" height="200">
                </a>
                <div class="cl"></div>
            </div>

            <div class="mt-10">
                <span class="fl mt-3 w-120">所属国家：</span>
                ${country_name}
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">备注：</span>
                <input type="text" class="txt txt-1 fl w-220" id="memo" name="memo" value="${data.memo}">
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">KYC审核状态：</span>
                <c:choose>
                    <c:when test="${data.auth_status==0}">
                        保存草稿
                    </c:when>
                    <c:when test="${data.auth_status==1}">
                        审核通过
                    </c:when>
                    <c:when test="${data.auth_status==2}">
                        待审核
                    </c:when>
                    <c:when test="${data.auth_status==3}">
                        审核拒绝
                    </c:when>
                </c:choose>
                <div class="cl"></div>
            </div>
            <div class="mt-10">
                <span class="fl mt-3 w-120">驳回原因：</span>
                <input type="text" class="txt txt-1 fl w-320" id="refuse_info" name="refuse_info"
                       value="${data.refuse_info}">
                <div class="cl"></div>
            </div>
            <div class="mt-30 ml-10">
                <c:if test="${data.auth_status!=0}">
                    <c:if test="${data.auth_status!=1}">
                        <input type="button" class="btn btn-1 fl w-100" value="审核通过" onclick="add(1)">
                    </c:if>
                    <c:if test="${data.auth_status!=3}">
                        <input type="button" class="btn btn-2 fl w-100 ml-20" value="审核拒绝" onclick="add(3)">
                    </c:if>

                </c:if>
                <input type="button" class="btn btn-2 fl w-100 ml-20" value="返回"
                       onclick="window.location='${basePath}/t_user_buyer_info/list'">
            </div>
        </div>
    </div>
</form>
<div class='clear'></div>
<script type="text/javascript">
    <%--function add() {--%>
    <%--$.post("${basePath}/ajax/t_user_buyer_info/add", $("#form1").serialize(), function (d) {--%>
    <%--if (d.code == 1) {--%>
    <%--alert("成功");--%>
    <%--window.location = "${basePath}/t_user_buyer_info/list";--%>
    <%--return;--%>
    <%--}--%>
    <%--alert("失败");--%>
    <%--});--%>
    <%--}--%>

    function add(status) {
        if (!window.confirm("确认操作?")) {
            return;
        }
        $.post("${basePath}/ajax/t_user_buyer_info/add",
            {
                user_id: $("#user_id").val(), auth_status: status,
                refuse_info: $("#refuse_info").val(), memo: $("#memo").val()
            },
            function (d) {
                if (d.code == 1) {
                    alert("成功");
                    window.location = "${basePath}/t_user_buyer_info/list";
                    return;
                }
                alert(d.msg);
            });
    }
</script>


